import Router from '@koa/router';

import MenuController from '@/controllers/menu.controller'

const menuRouter = new Router({ prefix: '/menu' });
// 创建菜单
menuRouter.post('/add', MenuController.add);

// 获取树形菜单
menuRouter.post('/tree', MenuController.tree);

// 获取扁平菜单
menuRouter.post('/flat', MenuController.flat);

// 删除菜单
menuRouter.post('/delete', MenuController.delete);

menuRouter.post('/update', MenuController.update);

export default menuRouter;